package com.mocksamples.subscriber;

public class Publisher   {
	
	private Subscriber subscriber = new NullSubscriber();

	public void add(Subscriber subscriber) {
		this.subscriber = subscriber;
	}

	public void publish(String message) {
		subscriber.receive(message);
	}
	
	class NullSubscriber implements Subscriber{
		public void receive(String message){
			// dp nothing
		};
	}

}
